factorial :: (Integral a) => a -> a
factorial 0 = 1
factorial n = factorial (n-1) * n

firstTwee :: (Integral a) => [a] -> [a]
firstTwee (x:y:z:rest) = x+y+z:rest

lingth :: [a] -> Int
lingth [] = 0
lingth (_:xs) = 1 + lingth xs

capital :: String -> String
captial "" = "Fzzb"
capital all@(x:xs) = "The capital of " ++ all ++ " is " ++ [x]

numberGame :: (Integral a) => a -> a -> a -> String
numberGame a b c
	| product < 10 = "Your product was less than 10"
        | product < 20 = "Your product was bigger than 10 but less than 20"
        | otherwise    = "Your product was over 20"
        where product = a*b*c

numberGame2 :: (Integral a) => a -> a -> a -> String
numberGame2 a b c
	| (product < lowBound) = "Your product was less than 10"
        | (product < highBound) = "Your product was bigger than 10 but less than 20"
        | otherwise    = "Your product was big!"
        where product = a*b*c
	      (lowBound, highBound) = (10, 20)
